<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增新生儿基本信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-baseinfo-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">新生儿姓名：</label>
                <div class="col-sm-8">
                    <input name="newbornName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">新生儿性别：</label>
                <div class="col-sm-8">
                    <select name="newbornSex" class="form-control m-b">
                        <option value="1">男</option>
                        <option value="2">女</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">所在医院名称：</label>
                <div class="col-sm-8">
                    <input name="hospitalName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">母亲姓名：</label>
                <div class="col-sm-8">
                    <input name="momName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">出生日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="birthday" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">新生儿体重 kg为单位：</label>
                <div class="col-sm-8">
                    <input name="newbornweight" class="form-control" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">家属联系方式：</label>
                <div class="col-sm-8">
                    <input name="phone" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">家属联系地址：</label>
                <div class="col-sm-8">
                    <input name="address" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">母亲身份证：</label>
                <div class="col-sm-8">
                    <input name="momIdcard" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">孕次产次：</label>
                <div class="col-sm-8">
                    <input name="pregnancyTimes" class="form-control" type="text" onkeyup="this.value=this.value.replace(/\D/g,'')">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">新生儿检查状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b" disabled>
                        <option value="">请选择</option>
                        <option value="1" selected>待初检</option>
                        <option value="2">待复检</option>
                        <option value="3">待治疗</option>
                        <option value="4">治疗中</option>
                        <option value="5">治疗结束</option>
                        <option value="6">待复检</option>
                        <option value="7">已结束</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/firstInspect"
        $("#form-baseinfo-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-baseinfo-add').serialize());
            }
        }

        $("input[name='birthday']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>
